#include "DeaconsWidget.h"

void DeaconsWidget::loadSpiritual()
{
	spiritual1->setText(QString("%1").arg(m_youth->deacons().spiritual().req1()));
	spiritual2->setText(QString("%1").arg(m_youth->deacons().spiritual().req2()));
	spiritual3->setText(QString("%1").arg(m_youth->deacons().spiritual().req3()));
	spiritual4->setText(QString("%1").arg(m_youth->deacons().spiritual().req4()));
	spiritual5->setText(QString("%1").arg(m_youth->deacons().spiritual().req5()));
	spiritual6->setText(QString("%1").arg(m_youth->deacons().spiritual().req6()));
	spiritual7->setText(QString("%1").arg(m_youth->deacons().spiritual().req7()));
	spiritual8->setText(QString("%1").arg(m_youth->deacons().spiritual().req8()));
	spiritual9->setText(QString("%1").arg(m_youth->deacons().spiritual().req9()));
	spiritual10->setText(QString("%1").arg(m_youth->deacons().spiritual().req10()));
	spiritual11->setText(QString("%1").arg(m_youth->deacons().spiritual().req11()));
	spiritual12->setText(QString("%1").arg(m_youth->deacons().spiritual().req12()));
	spiritual13->setText(QString("%1").arg(m_youth->deacons().spiritual().req13()));
}

void DeaconsWidget::on_spiritual1_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq1(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual2_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq2(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual3_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq3(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual4_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq4(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual5_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq5(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual6_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq6(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual7_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq7(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual8_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq8(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual9_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq9(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual10_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq10(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual11_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq11(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual12_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq12(percent);
	updateCompletions();
}

void DeaconsWidget::on_spiritual13_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().spiritual().setReq13(percent);
	updateCompletions();
}

